<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>会员管理</title>
	<link rel="stylesheet" href="<?= AC ?>table.css">
</head>
<body>
	<div class="table-wrap">
		<div class="table-main">
			<div class="ibox-title">
				<h3>会员列表<small>( <?= $count ?> ) 人</small></h3>
			</div>
			<div class="ibox-content">	
				<form action="index.php" class="form-main" method="get">
					<div class="form-btn">
						<a href="index.php?c=user&m=add" target="myIframe">+ 新增用户</a>
					</div>
					<div class="form-search">
						<input type="hidden" name="c" value="user">
						<input type="text" name="search" class="form-control" value placeholder="your tel or name" >
						<input type="submit" class="search-btn" value="搜索">
					</div>
				</form>
				<table class="list-table">
					<thead>
						<tr>
                            <th width="8%">ID</th>
                            <th width="7%">头像</th>
                            <th width="10%">昵称</th>
                            <th width="10%">电话</th>
                            <th width="15%">邮箱</th>
                            <!-- <th width="10%">姓名</th> -->
                            <!-- <th width="5%">性别</th> -->
                            <!-- <th width="15%">地址</th> -->
                            <th width="5%">状态</th>
                            <th width="15%">操作</th>
                       </tr>
					</thead>
					<tbody>
						<?php if(empty ($res)):?>
						<th colspan=7>暂无用户数据</th>
						<?php else:?>
						<?php foreach ($res as $k => $v): ?>
							<td><?= $v['id'] ?></td>
							<td>
								<?php if( empty($v['icon']) ):?>
								<img src="<?= AI ?>people_fill.png" alt="" >
								<?php else: ?>
								<img src="<?= imgUrl($v['icon']) ?>" >
								<?php endif; ?>
							</td>
							<td><?= $v['name'] ?></td>
							<td><?= $v['tel'] ?></td>
							<td><?= $v['email'] ?></td>
							<!-- <td>张旭</td>
							<td>男</td>
							<td>中国</td> -->
							<td><?= $v['status']==1?'激活':'禁用' ?></td>
							<td>
								<div class="btn-group">
									<a href="index.php?c=user&m=edit&id=<?= $v['id']?>" class="btn-white">编辑</a>
									<a href="index.php?c=user&m=doDel&id=<?= $v['id']?>" class="btn-white">删除</a>
									<a href="index.php?c=user&m=details&id=<?= $v['id']?>" class="btn-white">详情</a>
								</div>
							</td>
						</tr>
					<?php endforeach ?>
					</tbody>
				<?php endif; ?>
				</table> 
				<div class="btn-limit-group">
					<?= $page->showPage() ?>
				</div>
			</div>
		</div>
	</div>
</body>
</html>